<template>
	<view class="page-box bg-img ">
		<u-navbar
			:is-back="nav.isback"
			:title="nav.title"
			v-if="1"
			:border-bottom="false"
			title-color="#000"
			back-icon-color="#000"
		></u-navbar>

		<view class="h70"></view>
		<view class="content  flex flex-direction  justify-center align-center  ">
			<view
				class="w236 h76 bg-img bgimg "
				style="background-image:url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210825165142.png) ;"
			></view>
			<image :src="img+data.avatar" mode="aspectFill" class="w154 h154 round mt73"></image>
			<text class="mt26 text-bold f32">{{data.name}}</text>
			<view class="flex align-center f28 margin-top" style="color: #474518;">
				<text class="f28">工作时间{{data.working_years}}年以上</text>
				<text class="w6  block margin-lr" style="color: #B5B288;">▏</text>
				<text class="f28 ">资深专家</text>
			</view>
			<text class="f24 margin-top" style="color: #474518;">擅长：{{data.service_content}}</text>
			<view class="flex justify-center  flex-direction align-center padding">
				<image src="/static/images/jianjie.png" mode="aspectFill" class="w320 h56 mt52 mb27"></image>
				<text class="f26" style="color: #5A5830;line-height: 46rpx;" >
{{data.brief }}
				</text>
			</view>
			<view class="flex justify-center  flex-direction align-center padding">
				<image src="/static/images/jinli.png" mode="aspectFill" class="w320 h56 mt52 mb27"></image>
				<text class="f26" style="color: #5A5830;line-height: 46rpx;">
{{data.experience}}
				</text>
			</view>
			
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			dataList: [],
			empty: false,
			nav:{
				title:'专家',
				isback:true
			},
			data:{},
			img: 'https://guoxue.qianjiwl.xyz'
		};
	},
	onShow() {},
	onLoad(e) {
		
		this.activity(e.id)
	},
	onPageScroll(e) {
		
		if (e.scrollTop==0) {
			this.nav = {title:'专家' ,isback:true}
		}else {
			this.nav = {title:' ' ,isback:false}
		}
	},
	methods: {
		async activity(e) {
			let that = this;
			const res = await that.$http('common.gxmembersteacher', { id: 1, });
			
			let arr = res.data.data.filter((a) => {
				
				return a.id == e
			})
			this.data = arr[0]
			console.log('arr :>> ', arr);
			
		}
		// async name() {
		//     let obj = {
		//         page: this.page,
		//         page_size: this.page_size,
		//     };
		//     const res = await this.$u.post('UserInfo/inviteList', obj, {});
		//     this.data = res.data.list;
		//     this.data.length == 0 && (this.empty = true);
		//     console.log('res :>> ', res.data.list);
		// },
		// async name(pageNo, pageSize) {
		// 	let obj = {
		// 		page: pageNo,
		// 		page_size: pageSize
		// 	};
		// 	const res = await this.$u.post('UserInfo/inviteList', obj, {});
		// 	if (res.code) {
		// 		this.$refs.paging.complete(res.data.list);
		// 	}
		// }
	}
};
</script>

<style lang="scss" scoped>
.page-box {
	background-image: url(https://sprtcar.oss-cn-chengdu.aliyuncs.com/home/20210825164949.jpg);
	background-attachment: fixed;
	min-height: 100vh;
	.content {
		width: 690rpx;
		margin: 0 auto;
		border: 2rpx solid #898657;
		border-radius: 10rpx;
		position: relative;
		.bgimg {
			position: absolute;
			top: -38rpx;
			left: 50%;
			transform: translateX(-50%);
		}
	}
}
</style>
